<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<title>会员中心</title>
<link rel="stylesheet" href="__STATIC__/wap/css/public.css">
<link rel="stylesheet" href="__STATIC__/wap/css/style.css">
<script src="__STATIC__/wap/js/jquery.js">
</script>
<style>
input.name {
  background: white none repeat scroll 0 0;
  color: black;
  font-size: 0.9em;
  height: 30px;
  padding: 0;
  width: 50%;
  border:1px solid #acacac;
}

</style>
</head>

<body>
	<div class="mainer">
    	<div class="top">
        	<a class="left" href="{:U('Index/index')}"><img src="__STATIC__/wap/img/1_01.png"></a><span>我的铭牌</span><a class="right"><img src="__STATIC__/wap/img/1_03.png"></a>
        </div>
        <div class="inf">
        	 <div class="my">
             	 <p>我的信息</p>
                 <table>
                 	 <tr>
                     	<td>代号：{$rs.vipid}</td>
                     </tr>
                     <tr>
                     	<td>姓名：<input type="text" value="{$rs.name}" class="name" id="name" /></td>
                        <input type="hidden" value="{$rs.name}" id="exname">
                        <td style="text-align: right;"><input type="button" onclick="sub('name')" value="修改" /></td>
                     </tr>
                     <tr>
                     	<td>手机：<input type="text" value="{$rs.mobile}" class="name" id="mobile" /></td>
                        <input type="hidden" value="{$rs.mobile}" id="exmobile">
                        <td style="text-align: right;"><input type="button" onclick="sub('mobile')" value="修改" /></td>
                     </tr>
                     <tr>
                     	<td>慕龄：{$rs.time}小时</td>
                     </tr>
                 </table>
                 <span class="sn"><img src="__STATIC__/wap/img/1_11.png"></span>
             </div>
        </div>
        <div class="score">
        	<div class="sc">
        	<span>积分：<i>{$rs.points}</i></span>
            <a href="{:U('record')}">详细</a>
            </div>
        </div>
        <div class="score" style="border-bottom:1px solid #acacac">
        	<div class="sc sc1">
        	<span>优惠券：<i>4</i>张</span>
            <a>详细</a>
            </div>
        </div>
        <div class="foot">
        	<div class="focus">
                <a class="fo-left"><img src="__STATIC__/wap/img/1_18.png"></a>
                <a class="fo-right"><img src="__STATIC__/wap/img/1_20.png"></a>
            </div>
            <div class="focus" style="margin-top:5px; margin-bottom: 10px;">
                <a class="fo-left"><img src="__STATIC__/wap/img/1_24.png"></a>
                <a class="fo-right"><img src="__STATIC__/wap/img/1_25.png"></a>
            </div>
        </div>	
    </div>
</body>
<script>
    function sub(type){
        var exname = $('#exname').val();
            exmobile = $('#exmobile').val();
            // alert(type);
            if(type=='name'){
                if($('#name').val()==exname){
                    // return false;
                }else{
                    // alert(1);
                    if(confirm('确定修改？')){
                        $.get("http://game.guangjixinxi.com/musihui/Mobile/Flush/flush",{
                            name:$('#name').val()
                        },function (data){
                            if(data=='ok'){
                                alert('修改成功！');
                                $('#exname').val($('#name').val());
                            }
                        });
                    }
                }
            }else{
                if($('#mobile').val()==exmobile){
                    // return false;
                }else{
                    if(confirm('确定修改？')){
                        $.get("http://game.guangjixinxi.com/musihui/Mobile/Flush/flush",{
                            mobile:$('#mobile').val()
                        },function (data){
                            if(data=='ok'){
                                alert('修改成功！');
                                $('#exmobile').val($('#mobile').val());
                            }
                        });
                    }
                }
            }
    }
</script>
</html>
